using System;
using System.Drawing;

namespace Shlick
{
	public class ObjectMoveCommand : ICommand
	{		
		public string Name { get { return "Move Object"; } }
		private Point position;
		private Clandestine.Engines.Field.Object obj;
		
		public ObjectMoveCommand(Clandestine.Engines.Field.Object obj, Point pos)
		{
			this.obj = obj;
			this.position = pos;
		}
		
		public void Do ()
		{
			Point oldPos = this.obj.Position;
			this.obj.Position = this.position;
			this.position = oldPos;
		}

		public void Undo ()
		{
			// Will work the same as .Do()!
			this.Do();
		}
	}
}

